package com.raymond.run;

import com.raymond.netty.NettyStart;
import com.raymond.netty.ServerInitializer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * netty启动类
 *
 * @author :  raymond
 * @version :  1.0
 * @date :  2019/7/15
 */
@Component
@Slf4j
public class NettyRun implements CommandLineRunner {

    private final NettyStart nettyStart;

    public NettyRun(NettyStart nettyStart) {
        this.nettyStart = nettyStart;
    }

    @Override
    public void run(String... args) {
        nettyStart.init();
    }
}
